{% extends "photos/base.html" %}

{% load i18n %}
{% load humanize %}
{% load pagination_tags %}
{% load tagging_tags %}
{% load group_tags %}
{% load threadedcommentstags %}
{% load theme_tags %}

{% block head_title %}{% blocktrans %}Latest Photos{% endblocktrans %}{% endblock %}

{% block body %}
    
    <h1>{% trans "Latest Photos" %}</h1>
    
    {% if photos %}
    {% autopaginate photos %}
        <div class="thumb-row clearfix">
        {% for photo in photos %}
        <div class="gallery-photo-thumb">
            <a href="{% groupurl photo_details group id=photo.id %}"><img src="{{ photo.get_thumbnail_url }}" alt="{{ photo.title }}"/></a><br />
            from <a href="{% url profile_detail photo.member.username %}">{{ photo.member.username }}</a><br />
            {% silk "comment" %}<a href="{% groupurl photo_details group id=photo.id %}#photocomments">{% get_comment_count for photo as commentcount %} {{ commentcount }} Comments</a><br />
            {% blocktrans with photo.view_count as view_count %}Viewed {{ view_count }} times{% endblocktrans %}
        </div>
        {% endfor %}
        </div>
        {% paginate %}
    {% else %}
        <p>{% trans "No photos were found." %}</p>
    {% endif %}
    
    
{% endblock %}